import Vue from 'vue';
import Vonic from 'vonic';

import index from '../pages/index/index.vue';

// components
import coupon from '../pages/index/components/coupon/coupon.vue';
import store from '../pages/index/components/store/store.vue';
import order from '../pages/index/components/order/order.vue';
import my from '../pages/index/components/my/my.vue';


var routes = [
    {
        //重定向
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: index,
        children: [
            {
                //重定向
                path: '/index',
                redirect: '/index/coupon'
            },
            {
                path: '/index/coupon',
                name: 'coupon',
                component: coupon
            },
            {
                path: '/index/store',
                name: 'store',
                component: store
            },
            {
                path: '/index/order',
                name: 'order',
                component: order
            },
            {
                path: '/index/my',
                name: 'my',
                component: my
            },
        ]
    },
]

export default routes;
